﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;


using System.IO;
using System.Configuration;
public partial class Assessor_CandidateAssessor_ : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!this.IsPostBack)
        //{
        //    DataTable dt = new DataTable();
        //    DataTable dt1 = new DataTable();
        //    dt.Columns.AddRange(new DataColumn[1] { new DataColumn("GDStartDate") });
        //    ViewState["AssesserCalendar"] = dt;
        BindGrid();
        trCandidateName.Visible = false;
        trRegistrationNumber.Visible = false;
        trAssessorName.Visible = false;
          

        //}
    }
    protected void BindGrid()
    {
        gvCandidateSelectAssessordate.DataSource = GetDataSet2();
        gvCandidateSelectAssessordate.DataBind();

    }
    private DataSet GetDataSet2()
    {
        DataSet dsReport = new DataSet();
        DataTable dt = new DataTable();
        dt.Columns.Add("GDID");
        dt.Columns.Add("GDStartDate");
       
        DataRow r = dt.NewRow();
        r["GDID"] = "1";
        r["GDStartDate"] = "30-May-2015";
        dt.Rows.Add(r);

        DataRow r1 = dt.NewRow();
        r1["GDID"] = "2";

        r1["GDStartDate"] = "31-May-2015";

        dt.Rows.Add(r1);

        dsReport.Tables.Add(dt);
        
        return dsReport;
    }
    //protected void btnAdd_Click(object sender, EventArgs e)
    //{
    //    DataTable dt = (DataTable)ViewState["AssesserCalendar"];

    //    dt.Rows.Add("22/12/2015");
    //    ViewState["AssesserCalendar"] = dt;
    //    this.BindGrid();

    //}
    protected void gvCandidateSelectAssessordate_RowDataBound(object sender, GridViewRowEventArgs e)
    {

    }
    protected void btnGDDocument_Click(object sender, EventArgs e)
    {

    }
    protected void rbtInternal_External_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (rbtInternal_External.SelectedValue == "Internal")
        {
            trCandidateName.Visible = true;
            trRegistrationNumber.Visible = true;
            trAssessorName.Visible = false;
        }
        else if (rbtInternal_External.SelectedValue == "External")
        {
            trCandidateName.Visible = false;
            trRegistrationNumber.Visible = false;
            trAssessorName.Visible = true;
        }
        else
        {
            trCandidateName.Visible = false;
            trRegistrationNumber.Visible = false;
            trAssessorName.Visible = false;
        }
    }
    protected void mainMenu_MenuItemClick(object sender, MenuEventArgs e)
    {

    }
}